package com.omybug.study.config;

import com.omybug.study.controller.Game;
import com.omybug.study.entity.BenzCar;
import com.omybug.study.service.Fly;
import com.omybug.study.service.FlyImpl;
import com.omybug.study.service.LogService;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.DeclareParents;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * @author: omybug
 * @date: 18/9/24 19:49
 */
@Configuration
@EnableAspectJAutoProxy
@Aspect
public class AopConfig {

    @DeclareParents(value = "com.omybug.study.entity.Car+", defaultImpl = FlyImpl.class)
    public Fly fly;

    @Bean
    public Game game(){
        return new Game();
    }

    @Bean
    public BenzCar benzCar(){
        return new BenzCar();
    }

    @Bean
    public LogService logService(){
        return new LogService();
    }



}
